# https://docs.python.org/3/library/sqlite3.html
import sqlite3

connection = sqlite3.connect("database.db")


with open("schema.sql") as f:
    connection.executescript(f.read())

cur = connection.cursor()

cur.execute(
    "INSERT INTO user (username,email) VALUES (?, ?)",
    ("小明", "123@qq.com"),
)

cur.execute(
    "INSERT INTO user (username,email) VALUES (?, ?)",
    ("小张", "456@qq.com"),
)

connection.commit()
connection.close()
